#pragma once

#include "interaction/IInteraction.h"

class Interaction : public IInteraction
{
	typedef std::map<vclsid,sys::ObjectPtr> Selections;

public:
	BEGIN_DEFINE_CLASS(CLSID_Interaction)
		DEFINE_INTERFACE_ENTRY(IInteraction)
	END_DEFINE_CLASS()

	Interaction();
	virtual ~Interaction();

	virtual void ActiveView(const Points& pts);
	virtual uint32 ActiveRegion() const;
	virtual void ActiveRegion(uint32 value);
	virtual ISelection* ActiveSelection() const;
	virtual ISelection* ActiveSelection(vclsid selection=CLSID_Selection);

	virtual Point CalcRelativePoint(const Point& ptAbsolute);

private:
	uint32 m_activeRegion;
	Selections m_selections;
	Points m_pts;

	IObject* m_activeSelection;
};

AUTO_REGISTER_CLASSMAP_ENTRY(Interaction)